// <copyright file="PieChart.aspx.cs" company="YUIAsp.Net">
// Copyright (c) 2009 All Right Reserved
// </copyright>
// <author>raul popescu</author>
// <email>dev@yuiasp.net</email>
// <date>2009-01-30</date>
// <summary>YUIAsp.Net File</summary>

using System;
using YUIAspNet;

namespace YUIAspNetDemo.Chart
{
    public partial class PieChart : BaseDemoPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            LocalDataSource source = new LocalDataSource();
            source.AddColumn("Season");
            source.AddColumn("Voters");

            source.AddRow("Summer", "100");
            source.AddRow("Spring", "200");
            source.AddRow("Winter", "50");
            source.AddRow("Autumn", "50");

            this.pieChart.Source = source;
            this.pieChart.CategoryField = "Season";
            this.pieChart.DataField = "Voters";
        }
    }
}
